package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.VipDetailMapper;
import com.ruoyi.domain.VipDetail;
import com.ruoyi.service.IVipDetailService;
import com.ruoyi.common.core.text.Convert;

/**
 * 消费记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-08-10
 */
@Service
public class VipDetailServiceImpl implements IVipDetailService
{
    @Autowired
    private VipDetailMapper vipDetailMapper;

    /**
     * 查询消费记录
     * 
     * @param id 消费记录ID
     * @return 消费记录
     */
    @Override
    public VipDetail selectVipDetailById(Long id)
    {
        return vipDetailMapper.selectVipDetailById(id);
    }

    /**
     * 查询消费记录列表
     * 
     * @param vipDetail 消费记录
     * @return 消费记录
     */
    @Override
    public List<VipDetail> selectVipDetailList(VipDetail vipDetail)
    {
        return vipDetailMapper.selectVipDetailList(vipDetail);
    }

    /**
     * 新增消费记录
     * 
     * @param vipDetail 消费记录
     * @return 结果
     */
    @Override
    public int insertVipDetail(VipDetail vipDetail)
    {
        return vipDetailMapper.insertVipDetail(vipDetail);
    }

    /**
     * 修改消费记录
     * 
     * @param vipDetail 消费记录
     * @return 结果
     */
    @Override
    public int updateVipDetail(VipDetail vipDetail)
    {
        return vipDetailMapper.updateVipDetail(vipDetail);
    }

    /**
     * 删除消费记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteVipDetailByIds(String ids)
    {
        return vipDetailMapper.deleteVipDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除消费记录信息
     * 
     * @param id 消费记录ID
     * @return 结果
     */
    @Override
    public int deleteVipDetailById(Long id)
    {
        return vipDetailMapper.deleteVipDetailById(id);
    }

    @Override
    public List<VipDetail> selectVipDetailLists(Long id) {
        return vipDetailMapper.selectVipDetailLists(id);
    }
}
